<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/register.css">
    <title>注册</title>
</head>
<body>
    <div class="shadow">
        <div class="form">
            <span class="del" onclick="del()">x</span>
            <h2>注册</h2>
            <div class="auth">
                <a href="" style="color: #333;">已有账号</a>
                <a href="" style="color: #c54954;">立即登录</a>
            </div>
            <div class="form-box">
                <div class="group">
                    <i class="use"></i>
                    <input type="text" placeholder="给自己设置一个牛逼的昵称吧~">
                </div>
                <div class="group">
                    <i class="phone"></i>
                    <input type="text" placeholder="请输入11位手机号">
                </div>
                <div class="group">
                    <i class="numb"></i>
                    <input type="text" placeholder="请输入验证码" style="margin-left: 19px;width: 137px;">
                    <img class="pic" src="../img/yanzhengma.gif" alt="">
                    <span class="btn">换一换</span>
                </div>
                <div class="group">
                    <i class="email"></i>
                    <input type="text" placeholder="请输入短信验证码"style="margin-left: 23px; width: 182px;">
                    <span class="get">获取短信验证码</span>
                </div>
                <div class="group">
                    <i class="psw"></i>
                    <input type="text" placeholder="请输入密码">
                </div>
                <div class="group">
                    <i class="spsw"></i>
                    <input type="text" placeholder="请确认密码">
                </div>
                <p class="pswlogin">用户注册即代表同意<span style="color: #c54954;">《隐私政策》</span></p>
                <div class="submit">
                    <input type="text" class="login" value="登录" onclick="jump()">
                </div>
            </div>
        </div>
    </div>
</body>
<script>
const del=()=>{
    location.href="./index.html?"
}
const btn=document.querySelector('.btn')
btn.addEventListener('click',()=>{
    fetch('https://www.hotread.com/core/code')
    .then(res=>res.text()).then(res1=>{
        console.log(res1)
        const pic=document.querySelector('.pic')
        pic.src=res1
    }).catch(err=>{
        console.log(err)
    })   
})
//登录跳转首页
const jump=()=>{
    window.location.href="./personal.html?"
}

</script>
</html>